<?php

 function strDateToMsectime($time)
{
    list($usec,$sec) = explode(".", $time);
    $date = strtotime($usec);
    $return_data = str_pad($date.$sec, 13, "0", STR_PAD_RIGHT);
    return $return_data;
}

$time = '2020-09-07 18:32:24.111';
echo strDateToMsectime($time);